home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Toolkit / Songbird 0.1 / Songbird_0_1_0.exe / chrome / content / open_url.xul < prev    next >
Extensible Markup Language  |  2006-02-07  |  5KB  |  134 lines

  1. <?xml version="1.0"?>
  2. <!--
  3. /*
  4. //
  5. // BEGIN SONGBIRD GPL
  6. // 
  7. // This file is part of the Songbird web player.
  8. //
  9. // Copyright┬⌐ 2006 Pioneers of the Inevitable LLC
  10. // http://songbirdnest.com
  11. // 
  12. // This file may be licensed under the terms of of the
  13. // GNU General Public License Version 2 (the ΓÇ£GPLΓÇ¥).
  14. // 
  15. // Software distributed under the License is distributed 
  16. // on an ΓÇ£AS ISΓÇ¥ basis, WITHOUT WARRANTY OF ANY KIND, either 
  17. // express or implied. See the GPL for the specific language 
  18. // governing rights and limitations.
  19. //
  20. // You should have received a copy of the GPL along with this 
  21. // program. If not, go to http://www.gnu.org/licenses/gpl.html
  22. // or write to the Free Software Foundation, Inc., 
  23. // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  24. // 
  25. // END SONGBIRD GPL
  26. //
  27.  */
  28. -->
  29. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  30. <?xml-stylesheet href="chrome://rmp_demo/skin" type="text/css"?>
  31. <?xml-stylesheet href="chrome://rmp_demo/content/bindings/bindings.css" type="text/css"?>
  32. <!DOCTYPE window SYSTEM "chrome://rmp_demo/locale/rmp_demo.dtd" >
  33. <dialog 
  34.  xmlns:html="http://www.w3.org/1999/xhtml"
  35.  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  36.  id="open_url"
  37.  title="&open_url.title;"
  38.  buttons="false"
  39.  hidechrome="true"
  40.  ondialogaccept="return doOK();"
  41.  ondialogcancel="return doCancel();"
  42.  onload="document.getElementById('rmp_demo_open_url').focus();"
  43. >
  44. <!-- Astounding complexity! -->
  45. <!--windowregion/-->
  46. <stack flex="1">
  47.  
  48.   <vbox class="sb_faceplate" flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();">
  49.     <hbox class="sb_faceplate">
  50.         <image id="chrome_nw" class="sb_faceplate"/>
  51.         <image id="chrome_n" class="sb_faceplate" flex="1"/>
  52.         <image id="chrome_ne" class="sb_faceplate"/>
  53.     </hbox>
  54.     <hbox class="sb_faceplate" flex="1">
  55.         <image id="chrome_w" class="sb_faceplate"/>
  56.         <spacer onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" flex="1"/>
  57.         <image id="chrome_e" class="sb_faceplate"/>
  58.     </hbox>
  59.     <hbox class="sb_faceplate">
  60.         <image id="chrome_sw" class="sb_faceplate"/>
  61.         <image id="chrome_s" class="sb_faceplate" flex="1"/>
  62.         <image id="chrome_se" class="sb_faceplate"/>
  63.     </hbox>
  64.   </vbox>
  65.   
  66.   <vbox class="sb_faceplate" flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();">
  67.     <hbox class="sb_faceplate">
  68.       <spacer height="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/> 
  69.     </hbox>
  70.     <hbox class="sb_faceplate" flex="1">
  71.     <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();" />
  72.       <vbox class="sb_faceplate" flex="1" id="chrome_bkgd">        
  73.         <hbox id="window_top" class="sb_faceplate" >
  74.           <label id="app_title" value="&open_url.title;" class="sb_faceplate" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  75.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>                    
  76.           <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  77.           <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  78.           <button id="sysbtn_close" class="sb_faceplate" oncommand="onExit( );" tooltiptext="&tooltip.exit;"/>
  79.         </hbox>
  80.          <label id="rmp_demo_open_url_label" value="&textbox.rmp_demo_open_url;"/>
  81.         
  82.         <spacer height="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/> 
  83.         <hbox>          
  84.          <textbox class="dialog_textbox" id="rmp_demo_open_url"/> 
  85.         </hbox>
  86.         <spacer height="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  87.         <hbox>
  88.             <spacer flex="1" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>           
  89.             <button id="button_ok" label="&window.ok;" class="dialog_button sb_faceplate" oncommand="if ( doOK() ) onExit( );"/>
  90.             <spacer width="5" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  91.             <button id="button_cancel" label="&window.cancel;" class="dialog_button sb_faceplate" oncommand="if ( doCancel() ) onExit( );"/> 
  92.           </hbox>
  93.       </vbox>
  94.     <spacer width="8" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/>
  95.     </hbox>
  96.     <spacer height="10" onmousedown="onBkgDown( event );" onmouseup="onBkgUp();"/> 
  97.   </vbox>
  98. </stack>  
  99.  
  100.  
  101.   <!-- And intrepid instructions! -->  
  102.   <script type="application/x-javascript" 
  103.    src="chrome://rmp_demo/content/rmp_demo.js" />
  104.   <script>
  105.   <![CDATA[
  106.     // Init the text box to the last url played (shrug).
  107.     var theTextbox = document.getElementById( "rmp_demo_open_url" );
  108.     if ( ( typeof( window.arguments[0] ) != 'undefined' ) && ( typeof( window.arguments[0].URL ) != 'undefined' ) )
  109.     {
  110.       theTextbox.value = window.arguments[0].URL;
  111.     }
  112.     
  113.     function doOK()
  114.     {
  115.       if ( typeof( window.arguments[0] ) != 'undefined' )
  116.       {
  117.         window.arguments[0].URL = theTextbox.value;
  118.         window.arguments[0].retval = "ok";
  119.       }
  120.       return true;
  121.     }
  122.     function doCancel()
  123.     {
  124.       if ( typeof( window.arguments[0] ) != 'undefined' )
  125.       {
  126.         window.arguments[0].URL = theTextbox.value;
  127.         window.arguments[0].retval = "cancel";
  128.       }
  129.       return true;
  130.     }
  131.   ]]>
  132.   </script>
  133.   
  134. </dialog>